package cn.myjerry.flyWeight;

/**
 * 享元类
 * @author Jerry
 *
 */
public interface ChessFlyWeight {
	void setColor(String color);
	String getColor();
	void display(Coordinate c);
}

class concreteChess implements ChessFlyWeight {
	private String Color;
	public concreteChess(String color) {
		super();
		Color = color;
	}
	@Override
	public void setColor(String color) {
		this.Color = color;
	}
	@Override
	public String getColor() {
		return Color;
	}
	@Override
	public void display(Coordinate c) {
		System.out.println("棋子颜色：" + Color);
		System.out.println("棋子位置：" + c.getX() + "----" + c.getY());
	}
}
